import { getCurrentPageParams } from '@/utils/wx-tools'

export default {
  data () {
    return {
      openShopIdentity: ''
    }
  },
  computed: {
    // openShopIdentity() {
    //   return getUrlParam('identity')
    // }
  },
  onShow () {
    // this.changeTitle()
    this.openShopIdentity = getCurrentPageParams('identity')
  },
  methods: {
    changeTitle () {
      let map = { ENTITY: '实业宝', VIRTUAL: '网商宝', PERSONAL: '创业宝' }
      document.title = map[this.openShopIdentity] || ''
    },
    updateSubmitData (obj) {
      let key = 'open-shop-pay-data'
      let oldData = this.$cookie.get(key) || {}

      let newData = Object.assign(oldData, obj)

      this.$cookie.set(key, newData)
    }
  }
}
